Description: Upstream changes introduced in version 0.3.1-13
 This patch has been created by dpkg-source during the package build.
 Here's the last changelog entry, hopefully it gives details on why
 those changes were made:
 .
 pinball (0.3.1-13) unstable; urgency=low
 .
   * Depend on virtual libstdc++-dev in addition to libstdc++6-4.4-dev
     rather on a fixed version. Closes: #581606.
   * Delete /var/games/pinball on purge
   * Bump Standards-Version to 3.8.4
 .
 The person named in the Author field signed this changelog entry.
Author: Jochen Friedrich <jochen@scram.de>
Bug-Debian: http://bugs.debian.org/581606

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- pinball-0.3.1.orig/bootstrap
+++ pinball-0.3.1/bootstrap
@@ -1,4 +1,6 @@
-libtoolize --ltdl
+#! /bin/sh
+
+libtoolize --ltdl --force
 autoheader
 automake --add-missing
 aclocal
--- pinball-0.3.1.orig/pinball.desktop
+++ pinball-0.3.1/pinball.desktop
@@ -1,12 +1,9 @@
 [Desktop Entry]
-Encoding=UTF-8
-Categories=Application;Game;ArcadeGame;X-Red-Hat-Extra
+Categories=Game;ArcadeGame;X-Red-Hat-Extra;
 X-Desktop-File-Install-Version=0.2
 Name=Emilia Pinball
 Comment=OpenGL pinball game
 Exec=pinball
 Icon=pinball.xpm
-Terminal=0
+Terminal=false
 Type=Application
-                                                                                                                                                             
-                                                                                                                                                             
--- pinball-0.3.1.orig/configure.ac
+++ pinball-0.3.1/configure.ac
@@ -11,17 +11,23 @@ AC_CANONICAL_TARGET
 AM_INIT_AUTOMAKE
 
 dnl this is a c++ program
-CFLAGS="-g -W -Wall -O2"
-CXXFLAGS="-g -W -Wall -O2"
+dnl CFLAGS="-g -W -Wall -O2"
+dnl CXXFLAGS="-g -W -Wall -O2"
 
-AC_CONFIG_SUBDIRS(libltdl)
+AC_ARG_WITH(cflags,
+[  --with-cflags=CFLAGS            use CFLAGS as compile time arguments.],
+    [CFLAGS=$with_cflags; export CFLAGS])
+
+AC_ARG_WITH(cxxflags,
+[  --with-cxxflags=CXXFLAGS        use CXXFLAGS as compile time arguments.],
+    [CXXFLAGS=$with_cxxflags; export CXXFLAGS])
 
 dnl Checks for programs.
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_INSTALL
 AC_LIBTOOL_DLOPEN
-AC_LIBLTDL_CONVENIENCE
+LTDL_INIT
 AC_PROG_LIBTOOL
 
 AC_SUBST(INCLTDL)
--- pinball-0.3.1.orig/src/LoaderModule.cpp
+++ pinball-0.3.1/src/LoaderModule.cpp
@@ -61,6 +61,23 @@ LoaderModule* LoaderModule::getInstance(
 }
 //-----------------------------------------------------------------------------
 
+void LoaderModule::SanitizePath(std::string&str )
+{
+  // String to remove.
+  std::string sub = "../";
+
+  typedef std::string::size_type st;
+  typedef std::string::iterator it;
+  st npos = std::string::npos;
+  st pos = 0;
+    
+  while((pos = str.find(sub)) != npos) {
+    it first = str.begin() + pos;
+    it last = first + sub.size();
+    str.erase(first, last);
+  }
+}
+
 /// is it possible to do something 
 /// like in java.lang.reflexion instead of protypes ?
 Behavior* LoaderModule::readLibStatic(string & filename) 
@@ -82,6 +99,10 @@ Behavior* LoaderModule::readLibDynamic(s
 {
   EM_COUT("+ LoaderModule::readLibDynamic",0);
   Behavior * beh =0;
+
+  // Disallow directory traversal
+  SanitizePath( filename );
+
 #ifndef RZR_LIBSTATIC
   lt_dlhandle handle = lt_dlopen(filename.c_str());
   if (handle == NULL) {
--- pinball-0.3.1.orig/src/LoaderModule.h
+++ pinball-0.3.1/src/LoaderModule.h
@@ -40,6 +40,9 @@ public:
   /// portable dyn lib loading
   Behavior* readLibDynamic(string & filename);
 
+private:
+  void SanitizePath(std::string&str );
+
 protected:
   ///
   map<char* const, Behavior* , ltstr> m_hMods;
--- pinball-0.3.1.orig/src/Table.cpp
+++ pinball-0.3.1/src/Table.cpp
@@ -140,7 +140,7 @@ int Table::loadLevel(Engine * engine, co
   Loader::getInstance()->clearSignalVariable();
   if (Loader::getInstance()->loadFile(filename.c_str(), engine) != 0) {
     cerr << "Error loading level: " << m_sTableName << endl;
-    cerr << "Try reinstalling the game or use the -data switch to specify the data directory"
+    cerr << "Try reinstalling the game"
          << endl;
     this->clear(engine);
     return -1;
--- pinball-0.3.1.orig/base/Config.cpp
+++ pinball-0.3.1/base/Config.cpp
@@ -358,13 +358,6 @@ void Config::loadArgs(int & argc, char *
       }
       EM_COUT("Using " << m_iBpp << " bpp", 1);
       REMOVEARG(a, argc, argv);
-    } else if (strcmp(argv[a], "-data") == 0) {
-      if (argc > a) {
-	EM_COUT("Using datapath: " << argv[a+1], 1);
-	this->setDataDir(argv[a+1]);
-	REMOVEARG(a, argc, argv);
-      }
-      REMOVEARG(a, argc, argv);
     } else if (strcmp(argv[a], "-nosound") == 0) {
       this->setSound(0);
       this->setMusic(0);
@@ -423,7 +416,7 @@ void Config::setPaths(char const * const
   m_sDataDir = string(EM_DATADIR) + "/";
   m_sExeDir = "./";
   if ( *( m_sDataDir.c_str() ) != '/' ) {
-    char* ptr=0; 
+    const char* ptr=0;
     char* ptrw = 0;
     //cout<<"relative to exe file"<<endl;
     ptr = (strrchr(argv0,'/')); // unix /cygwin / check win32 
